/* ───────────────────────────────
   学生个人资料页面样式 ‑ 现代化设计
   ─────────────────────────────── */

/* 头部 -------------------------------------------------- */
.student-profile-header{
    background:#93CAFF;
    padding:40px 0;
    position:relative;
    overflow:hidden
}
.student-profile-header::before{
    content:'';
    position:absolute;
    inset:0;
    /* background:rgba(0,0,0,.3); */
    z-index:1
}
.student-profile-head{
    display:flex;
    align-items:center;
    max-width:1200px;
    margin:0 auto;
    padding:0 20px;
    position:relative;
    z-index:2
}
.student-profile-head img{
    width:120px;height:120px;
    border-radius:50%;
    margin-right:30px;
    border:4px solid rgba(255,255,255,.9);
    /* box-shadow:0 8px 32px rgba(0,0,0,.3); */
    transition:.3s transform;
    object-fit:cover
}
.student-profile-body{
    display:flex;
    /* max-width:1500px;  */
     /* gap:30px;  */
    position:relative;
    z-index:2;
    background:transparent
}

/* 侧边栏 ------------------------------------------------ */
/* ───────── 侧边栏 ───────────────────────────── */
.sidebar{
    /* width:260px; */
    background:#fff;
    /* border-radius:12px; */
    /* box-shadow:0 8px 32px rgba(0,0,0,.1); */
    overflow:hidden;
    height:max-content;
    position:sticky;
    top:20px;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    transition:width .3s;
}

/* ===== 折叠状态 ===== */
.sidebar.collapsed{
    width:23px;                 /* 仅按钮宽度 */
}
.sidebar.collapsed .sidebar-item{
    display:none;               /* 完全隐藏所有导航文字/图标 */
}

/* ─── 导航项 ─────────────────────────────────── */
.sidebar-item{
    display:block;
    padding:18px 24px;
    font:500 16px/1 "Inter",sans-serif;
    color:#64748b;
    text-decoration:none;
    text-align:center;
    border-bottom:1px solid #f1f5f9;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    transition:.3s background,.3s color;
}
.sidebar-item:last-child{border-bottom:none}
.sidebar-item:hover{
    background:linear-gradient(90deg,#f8fafc 0%,#e2e8f0 100%);
    color:#0f172a;
}
.sidebar-item.active{background:#6195FF;
    color:#fff;
    font-weight:600;
}
/* 普通状态下按钮 */
.sidebar-toggle-btn {
    /* position: absolute; */
  margin-top: 10px; /* 加点上边距，和上面菜单分隔 */
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: #0ea5e9;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.3s ease, transform 0.2s ease;
    box-shadow: none;
    z-index: auto;
    display: block; /* 确保是块级元素，占满一行 */
    width: 100%;    /* 如果需要按钮撑满侧边栏宽度 */
    text-align: center; /* 文字居中 */
}

/* 悬停 */
.sidebar-toggle-btn:hover {
    color: #0284c7;
    transform: scale(1.05);
}

/* 折叠状态下，侧边栏宽度缩小 */
.sidebar.collapsed {
    width: 23px;
    overflow: visible; /* 避免内容裁剪 */
    position: relative; /* 方便定位内部按钮 */
}

/* 折叠状态下按钮位置调整 */
.sidebar.collapsed .sidebar-toggle-btn {
    right: 2px;           /* 调整右边距，让按钮靠近侧边栏边缘 */
    bottom: -20px;         /* 可以微调底部距离 */
    padding: 4px 8px;     /* 可适当缩小按钮内边距 */
    font-size: 13px;      /* 适当缩小字体 */
    border-radius: 4px;   /* 适当调整圆角 */
    background: transparent;
    color: #0ea5e9;
    box-shadow: none;
    /* 保持 position absolute 不变 */
    position: absolute;
  
}


/* ─── 内容区补白 ─────────────────────────────── */
.sidebar.collapsed + .content{
    margin-left:60px;           /* 与收起后的侧边栏宽度一致 */
}

/* 主内容区域 ------------------------------------------ */
.content{
    flex:1;
    background:#fff;
    /* border-radius:12px; */
    /* box-shadow:0 8px 32px rgba(0,0,0,.1); */
    min-height:600px;
    overflow:hidden;
    margin:0 auto;   
}

/* 标签页 ---------------------------------------------- */
.tabs{
    display:flex;
    padding:20px 30px 0;
    border-bottom:2px solid #f1f5f9
}
.tabs-item{
    position:relative;
    padding:12px 24px;
    margin-right:8px;
    font:500 16px/1 "Inter",sans-serif;
    color:#64748b;
    text-decoration:none;
    border-radius:8px 8px 0 0;
    transition:.3s
}
.tabs-item:hover{
    color:#0f172a;background:rgba(14,165,233,.1)
}
.tabs-item.active{
    color:#0ea5e9;background:#fff;font-weight:600
}
.tabs-item.active::after{
    content:'';position:absolute;left:0;right:0;bottom:-2px;
    height:2px;background:#0ea5e9
}
.tabs-content{padding:30px}

/* 课程卡片 -------------------------------------------- */
.registered{
    display:flex;
    padding:20px;
    margin-bottom:16px;
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:12px;
    position:relative;
    transition:.3s
}
.registered:hover{
    /* border-color:#0ea5e9; */
    /* box-shadow:0 8px 24px rgba(14,165,233,.1); */
    transform:translateY(-2px)
}
.course-image{
    width:280px;height:193px;
    margin-right:20px;
    border-radius:8px;
    overflow:hidden;
    box-shadow:0 4px 16px rgba(0,0,0,.1)
}
.course-image img{
    width:100%;height:100%;object-fit:cover;
    transition:.3s transform
}
.course-image img:hover{transform:scale(1.05)}
.course-info{flex:1;display:flex;flex-direction:column;justify-content:space-between}
.course-info h3{
    margin:0 0 8px;
    font:600 18px/1.4 "Inter",sans-serif;
    color:#1e293b
}
.teacher{color:#64748b;font-size:14px;margin-bottom:12px}
.course-description{
    color:#64748b;font-size:14px;line-height:1.6;margin-bottom:16px
}

/* 课件与作业 ------------------------------------------ */
.courseware,.homework{
    display:flex;align-items:center;
    padding:16px 20px;margin-bottom:12px;
    background:#fff;border:1px solid #e2e8f0;border-radius:8px;
    transition:.3s
}
.courseware:hover,.homework:hover{
    border-color:#0ea5e9;
    box-shadow:0 4px 16px rgba(14,165,233,.1);
    transform:translateY(-1px)
}

/* ……（笔记、评论、按钮、空态等保持不变，已在原文件中） */

/* 响应式 ---------------------------------------------- */
@media(max-width:968px){
    .student-profile-body{
        flex-direction:column;gap:20px}
    .sidebar{width:100%;position:static}
    .sidebar.collapsed{width:0;padding:0;border:none;box-shadow:none;background:transparent}
    .content{width:100%}
}
/* 手机端隐藏折叠按钮 */
@media(max-width:968px){.sidebar-toggle-btn{display:none}}
/* 笔记卡片整体容器 */
.mynotes.note-card {
  margin-bottom: 20px;
  border: 1px solid #e5e7eb; /* 浅灰边框 */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); /* 微弱阴影 */
  border-radius: 10px;
}

.note-card-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.note-card-inner:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

/* 头部区域 */
.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 作者和课程信息容器 */
.note-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* 作者信息 */
.note-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 用户头像 */
.avatar-small {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid #ddd;
}

/* 作者名字和时间 */
.author-details {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #374151;
}

.author-name {
  font-weight: 600;
  color: #111827;
}

.note-time {
  font-weight: 400;
  color: #6b7280;
  margin-top: 2px;
}

/* 课程标签 */
.course-badge {
  background: #e0f2fe;
  color: #0284c7;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
}

/* 操作按钮容器 */
.note-actions {
  display: flex;
  gap: 10px;
}

/* 操作按钮 */
.action-btn {
  background-color: #0284c7;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  user-select: none;
}

.action-btn:hover {
  background-color: #0369a1;
}

/* 可展开按钮单独风格 */
.expand-btn {
  background-color: #2563eb;
}

.expand-btn:hover {
  background-color: #1e40af;
}

/* 笔记主体内容 */
.note-body {
  font-size: 15px;
  color: #374151;
  line-height: 1.6;
}

/* 笔记文本块 */
.note-text.expandable {
  max-height: 100px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.3s ease;
}

.note-text.expandable::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, #fff);
  pointer-events: none;
}

.note-text.expandable.expanded {
  max-height: none;
}

/* 底部区域 */
.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
  flex-wrap: wrap;
  gap: 10px;
}

/* 字数统计 */
.note-stats {
  font-weight: 500;
}

/* 标签区域 */
.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 标签样式 */
.tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
}
/*讨论*/
.comment-card-inner {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

/* 头像样式（30x30） */
.comment-author img.avatar-small {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  margin-right: 12px;
}

/* 作者信息排版 */
.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-details {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #334155;
}

/* 评论时间 */
.comment-time {
  font-size: 12px;
  color: #94a3b8;
}

/* 标题课程标签 */
.course-tag {
  background: #f1f5f9;
  color: #1e293b;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

/* 元信息区域 */
.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 按钮区域 */
.comment-actions-below {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-grow: 1;
  padding-right: 10px; /* 让按钮不紧贴边界 */
}

.comment-actions {
  display: flex;
  gap: 8px;
}

/* 评论内容文本 */
.comment-text {
  font-size: 15px;
  line-height: 1.6;
  color: #374151;
  text-align: justify;
}

.comment-text.expandable {
  max-height: 100px;
  overflow: hidden;
  position: relative;
}

.comment-text.expandable:not(.expanded)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, white);
  pointer-events: none;
}

/* 底部区域 */
.comment-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* padding: 16px 24px 20px; */
  /* background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); */
  box-sizing: border-box;
  gap: 12px;
  flex-wrap: wrap;
}
.comment-stats {
  flex-shrink: 0;
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}
/* 标签 */
.comment-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.comment-tags .tag {
  background: #e2e8f0;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 13px;
  color: #334155;
}
/*测验*/
.quiz-item {
    display: flex; /* 这句是关键 */
    border: 1px solid #ccc;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    background-color: #f9f9f9;
    align-items: center;      /* 垂直居中 */
    justify-content: space-between; /* 左右两端对齐 */
}

.quiz-item h3 {
    margin: 0 0 8px 0;
    color: #333;
}

.quiz-item button {
    padding: 6px 12px;
    background-color: #0ea5e9;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
}
  .quiz-item > div {
    flex-grow: 1; /* 让文本部分占满剩余空间 */
  }
.quiz-item button:hover {
    background-color: #0284c7;
}

